package com.example.superjson.util;

import java.io.Serializable;
import java.sql.Time;


public class SensorData  implements Serializable
{
	/**
	 * 
	 */
	private static final long serialVersionUID = -7018873606112078454L;
	
	String _key;
	float _density;
	int _stream;
	Time _time;
	Time _runtime;
	
	public SensorData(){
		
	}
	
	public void setKey(String key) {
		_key = key;
	}
	public void setDensity(float density){
		_density = density;
	}
	public void setStream(int stream){
		_stream = stream;
	}
	public void setTime(Time time){
		_time = time;
	}
	public void setRuntime(Time runtime)
	{
		_runtime = runtime;
	}
	
	
	public String getKey(){
		return _key;
	}
	public float getDensity(){
		return _density;
	}
	public int getStream(){
		return _stream;
	}
	public Time getTime(){
		return _time;
	}
	public Time getRuntime(){
		return _runtime;
	}
	
	public boolean isFull(){
		if (_key != null && !Float.isNaN(_density) && _stream != 0 && _time != null && _runtime != null){
			return true;
		}
		return false;
	}
	public String toString() {
		return "{key:"+_key+";value:{density:'"+ _density +"';stream:'"+ _stream +"';time:'"+ _time.toString() +"';runtime:'" + _runtime.toString() +"'}}";
	}
}	